<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ArticleList.ascx.cs" Inherits="admin_ArticleList" %>
<script type="text/javascript">
    var the_url = "";
    function get_text() {
        the_url ="Default.aspx?ctrl=article_list&search="+ document.getElementById("txtS").value;
    }
</script>
<table>
    <tr>
        <td style="width: 130px">
            <asp:Label ID="Label1" runat="server" Text="Enter text to search"></asp:Label></td>
        <td style="width: 100px">
            <input type="text" onblur="get_text();" name="txtS" id="txtS" />
            </td>
        <td style="width: 100px"><a class="c_button" href="javascript:location=the_url">Search</a></td>
    </tr>
</table>
<asp:Label ID="Label2" runat="server" Text="Article list:"></asp:Label><br />
<asp:GridView ID="dgrArticle" runat="server" AutoGenerateColumns="False" CssClass="list_table" OnRowEditing="dgrArticle_RowEditing" DataKeyNames="ID">
    <Columns>
        <asp:TemplateField>            
            <ItemTemplate>
                <asp:CheckBox ID="chkChoice" runat="server" />
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Title">       
            <ItemTemplate>
                <asp:Label ID="Label1" runat="server" Text='<%# Bind("Title") %>'></asp:Label>
            </ItemTemplate>
        </asp:TemplateField>      
        <asp:BoundField DataField="ModifiedDate" HeaderText="Modified date" />
        <asp:BoundField DataField="Tag" HeaderText="Tag" />     
        <asp:TemplateField>
            <ItemTemplate>
                <asp:CheckBox ID="chkState" runat="server" Enabled="false" Checked='<%#Bind("State") %>' />
            </ItemTemplate>
        </asp:TemplateField>         
        <asp:TemplateField>
            <ItemTemplate>
            <a href='Default.aspx?ctrl=article&mode=1&id=<%# Eval("Id") %>'>Edit</a>
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
</asp:GridView>
<div id="lnkPaging"><asp:Label ID="lblPaging" runat="server"></asp:Label>
<asp:LinkButton CssClass="lnkDelete" ID="lnkDelete" runat="server" OnClick="lnkDelete_Click">Delete selected items</asp:LinkButton></div>
<br />
<script type="text/javascript" language="javascript">    
	window.location.hash="<%=ActiveAccording %>";
</script>
